import request from '@/utils/request'

// 查询资产退还列表
export function listH(query) {
  return request({
    url: '/eam-a/returnH/list',
    method: 'get',
    params: query
  })
}

// 查询资产退还详细
export function getH(returnId) {
  return request({
    url: '/eam-a/returnH/' + returnId,
    method: 'get'
  })
}

// 新增资产退还
export function addH(data) {
  return request({
    url: '/eam-a/returnH',
    method: 'post',
    data: data
  })
}

// 修改资产退还
export function updateH(data) {
  return request({
    url: '/eam-a/returnH',
    method: 'put',
    data: data
  })
}

// 删除资产退还
export function delH(returnId) {
  return request({
    url: '/eam-a/returnH/' + returnId,
    method: 'delete'
  })
}

export function delD(manage) {
  return request({
    url: '/eam-a/returnD/' + manage,
    method: 'delete'
  })
}

export function getCode() {
  return request({
    url: '/eam-a/returnH/getCode',
    method: 'get',
  })
}

export function listLowerBranch(manageId) {
  return request({
    url: '/eam-a/depts/list',
    method: 'get'
  })
}

export function listLowerStaff() {
  return request({
    url: '/eam-a/users/list',
    method: 'get'
  })
}

export function listLowerBranchdata(deptId) {
  return request({
    url: '/eam-a/users/seleDept/'+deptId,
    method: 'get'
  })
}

export function listEntrepot() {
  return request({
    url: '/eam-a/lotion/list',
    method: 'get'
  })
}

export function listType() {
  return request({
    url: '/eam-a/types/list',
    method: 'get'
  })
}

export function listIdleEam(data) {
  return request({
    url: '/eam-a/asset/list?useStatus='+data.useStatus+"&assetName="+data.assetName+"&TypeId="+data.TypeId+"&locationId="+data.locationId,
    method: 'get'
  })
}

export function addD(data) {
  return request({
    url: '/eam-a/returnD',
    method: 'post',
    data: data
  })
}


export function updD(data) {
  return request({
    url: '/eam-a/returnD',
    method: 'put',
    data: data
  })
}

export function listEam(query) {
  return request({
    url: '/eam-a/eam/list',
    method: 'get',
    params: query
  })
}

export function updateAsset(data) {
  return request({
    url: '/eam-a/asset',
    method: 'put',
    data: data
  })
}

export function updateEamD(data) {
  return request({
    url: '/eam-a/EamD',
    method: 'put',
    data: data
  })
}
